/**
 * 
 */
package zeroj.web.validator;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LYL(lylsir at gmail dot com)
 *
 */
public class Validate {

	public final String name;
	public final List<IValidator> validators;
	
	public Validate(String name) {
		
		this.name = name;
		this.validators = new ArrayList<IValidator>();
	}
	
	public Validate(String name, List<IValidator> validators) {
		
		this.name = name;
		this.validators = validators;
	}
	
	public void addValidator(IValidator validator) {
		validators.add(validator);
	}
	
	public void addValidator(List<IValidator> validators) {
		
		this.validators.addAll(validators);
	}
}
